package pactexample339

class SampleController {
	static responseFormats = ['json', 'xml']
	
    def index() {
        def result = [
                field1: "hello ${params.user ?: 'world'}" as String, field2: new Random().nextInt(10), field3: new Date()
        ]

        respond result, formats: responseFormats
    }
}
